// This is where project configuration and plugin options are located.
// Learn more: https://gridsome.org/docs/config

// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`

module.exports = {
  siteName: 'Gridsome',
  plugins: [
    {
      use: '@gridsome/source-strapi',
      options: {
        apiURL: process.env.GRIDSOME_API_URL,
        queryLimit: 1000, // Defaults to 100
        // 这是集合
        contentTypes: ['posts', 'tags', 'projects', 'journals', 'categories'],
        // 这是单一类型
        singleTypes: ['general']
        // Possibility to login with a Strapi user,
        // when content types are not publicly available (optional).
        // loginData: {
        //   identifier: 'tvChan',
        //   password: '123456'
        // }
      }
    }
  ],
  templates: {
    StrapiProjects: [
      {
        path: '/projects/:id',
        component: './src/templates/Project.vue'
      }
    ],
    StrapiJournals: [
      {
        path: '/journals/:id',
        component: './src/templates/Journal.vue'
      }
    ]
  }
}
